{extend name="./oscshop/admin/view/public/base.html" /}
{block name="content"}
<div class="page-header">
	<h1>	
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
	</h1>
</div>

	
<table class="table table-striped table-bordered table-hover search-form">
	<thead>
		
		<th><input name="user_name" type="text" placeholder="输入会员手机号码" value="{:input('param.user_name')}" /></th>		
		
		<th>
			<a class="btn btn-primary" href="javascript:;" id="search" url="{:url('useticket/list')}">查询</a>
					<th>
		</th>
	</thead>
</table>	
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
					    <th>编号</th>											
						<th>用户</th>
						<th>产品名</th>
						<th>数量</th>
						<th>加工费</th>
						<th>使用提货数量</th>	
						<th>收货地址</th>
						<th>收货人</th>	
						<th>收货电话</th>
						<th>生成时间</th>
						<th>订单状态</th>
						<th>已收款</th>
						<th>已发货</th>
						<th>操作</th>	
					</tr>
				</thead>
				<tbody>
						{volist name="list" id="v" empty="$empty"}
						<tr>						
							<td>{$v.id}</td>
							<td>{$v.username}</td>

							<td>
							{$v.name}
							</td>
							<td>
								{$v.num}
							</td>
							<td>
								{$v.price}
								
							</td>		
							<td>
								{$v.number}
								
							</td>
							<td>
								{$v.address}
							
							</td>

							<td>

								{$v.accuser}
							</td>										
							<td>

								{$v.accmobile}
							</td>									
							<td>
								<?php echo date('Y-m-d H:i:s',$v['create_time']); ?>
							</td>							
							
							<td>
								{if condition="$v.order_status eq 0"}待付款{/if}
								{if condition="$v.order_status eq 1"}已付款{/if}
								{if condition="$v.order_status eq 2"}已发货{/if}
							</td>
							<td>
								<a class="btn btn-primary" href="/admin/useticket/pay?id={$v['id']}">已收款</a>
							</td>
							<td>
								<a class="btn btn-primary" href="/admin/useticket/send?id={$v['id']}">已发货</a>
							</td>
							
							<td>
								<a class="btn btn-primary" href="/admin/useticket/info?id={$v['id']}">修改</a>
							</td>
						</tr>
						{/volist}	
						
						<tr>
							<td colspan="20" class="page">{$list->render()}</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
{/block}
{block name="javascript"}
<script>	
$(function(){
   $("#search").click(function () {
        var url = $(this).attr('url');
        var query = $('.search-form').find('input,select').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
        query = query.replace(/^&/g, '');
        if (url.indexOf('?') > 0) {
            url += '&' + query;
        } else {
            url += '?' + query;
        }
        window.location.href = url;
    });	
});
</script>
{/block}